[IA64][HVM] Use vcpu info from getdomaininfo
authorawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Thu, 14 Dec 2006 16:56:41 +0000 (09:56 -0700)
committerawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Thu, 14 Dec 2006 16:56:41 +0000 (09:56 -0700)
This replaces the get/set_param using HVM_PARAM_VCPUS

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
tools/libxc/ia64/xc_ia64_hvm_build.c
tools/python/xen/lowlevel/xc/xc.c
xen/include/public/arch-ia64.h

index ac3a2ff00d7d40e5a15db77c30897d69434f735b..3bfa274293ff15c155dd1cced099cef37a80807f 100644 (file)
@@ -660,8 +660,14 @@ setup_guest(int xc_handle, uint32_t dom, unsigned long memsize,
         goto error_out;
     }
 
-    // Get number of vcpus, stored by pyxc_hvm_build()
-    xc_get_hvm_param(xc_handle, dom, HVM_PARAM_VCPUS, &vcpus);
+    domctl.cmd = XEN_DOMCTL_getdomaininfo;
+    domctl.domain = (domid_t)dom;
+    if (xc_domctl(xc_handle, &domctl) < 0) {
+        PERROR("Could not get info on domain");
+        goto error_out;
+    }
+
+    vcpus = domctl.u.getdomaininfo.max_vcpu_id + 1;
 
     // Hand-off state passed to guest firmware 
     if (xc_ia64_build_hob(xc_handle, dom, dom_memsize, vcpus) < 0) {
index f69cbf2a4101cf45af8c1f4235332652e50b8ff8..eaa8fe0846cb72788d689044cb86d314a320f422 100644 (file)
@@ -408,10 +408,6 @@ static PyObject *pyxc_hvm_build(XcObject *self,
                                       &image, &vcpus, &pae, &acpi, &apic) )
         return NULL;
 
-#if defined(__ia64__)
-    /* Set vcpus to later be retrieved in setup_guest() */
-    xc_set_hvm_param(self->xc_handle, dom, HVM_PARAM_VCPUS, vcpus);
-#endif
     if ( xc_hvm_build(self->xc_handle, dom, memsize, image) != 0 )
         return pyxc_error_to_exception();
 
index d478fb0afa441a4d4a4e63fc13ffbfad3041fa6e..65cc233af3137d0e50c8b9edbd0b44e13f9fcd11 100644 (file)
@@ -66,13 +66,6 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
 /* WARNING: before changing this, check that shared_info fits on a page */
 #define MAX_VIRT_CPUS 64
 
-/*
- * HVM_PARAM_PAE_ENABLED is meaningless on ia64, so we overload this
- * entry to store the number of vCPUs.  XXX Need arch-specific extentions
- * for xc_get/set_hvm_param().
- */
-#define HVM_PARAM_VCPUS    HVM_PARAM_PAE_ENABLED
-
 #ifndef __ASSEMBLY__
 
 typedef unsigned long xen_ulong_t;